package com.cks;

import com.cks.util.GameUtils;

import javax.swing.*;
import java.awt.*;

/*
监听鼠标键盘主类
 */
public class GameWin extends JFrame {

    int wight = 2 * GameUtils.OFFSET + GameUtils.MAP_W * GameUtils.SQUARE_LENGTH;
    int height = 4 *  GameUtils.OFFSET + GameUtils.MAP_H * GameUtils.SQUARE_LENGTH;
    //创建窗口
    void launch(){
        this.setVisible(true);
        this.setSize(wight, height);
        this.setLocationRelativeTo(null);
        this.setTitle("game");
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    /*
    * 绘制雷区
    * */

    @Override
    public void paint(Graphics g) {
        MapBottom mapBottom = new MapBottom();
        mapBottom.paintSelf(g);
    }

    /*
        入口函数
         */
    public static void main(String[] args) {
        GameWin gw = new GameWin();
        gw.launch();
    }
}
